//自己封装
const request = (method, url, params) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: url, //仅为示例，并非真实接口地址。
			method: method,
			data: params,
			header: {
				'content-type': 'application/json' //自定义请求头信息
			},
			success: res => {
				resolve(res);
			},
			fail: (err) => {
				reject(err);
			},
			complete: () => {}
		});
	})
};

export {
	request
}
